import  request from '@/utils/request'
enum  API{
    category1='/admin/product/getCategory1',
   category2= '/admin/product/getCategory2/',
   category3='/admin/product/getCategory3/',
   attrInfoList='/admin/product/attrInfoList/',
   saveAttrInfo='/admin/product/saveAttrInfo',
   deleteAttrInfo='/admin/product/deleteAttr/'

}
// 获取1级分类列表 
export const reqCategory1=()=>request.get(API.category1)
// 获取2级分类列表
export const reqCategory2=(category1Id:any)=>request.get(API.category2+`${category1Id}`)
// 获取3级分类列表  
export const reqCategory3=(category2Id:any)=>request.get(API.category3+`${category2Id}`)
// 获取attr列表
export const  reqAttrInfoList=(category1Id:number|string,category2Id:number|string,category3Id:number|string,)=>request.get(API.attrInfoList+`${category1Id}/${category2Id}/${category3Id}`)
// 新增品牌属性
export const  reqSaveAttr=(data:any)=>request.post(API.saveAttrInfo,data)
// 删除品牌
export const  reqDeleteAttr=(id:number)=>request.delete(API.deleteAttrInfo+`${id}`)


